Skip to content

[18.0][MIG] web_timeline#3136

Merged
OCA-git-bot merged 75 commits intoOCA:18.0from
ForgeFlow:18.0-mig-web_timeline
May 13, 2025
Merged

[18.0][MIG] web_timeline#3136
OCA-git-bot merged 75 commits intoOCA:18.0from
ForgeFlow:18.0-mig-web_timeline

Conversation

@JasminSForgeFlow
Copy link
Contributor

@JasminSForgeFlow JasminSForgeFlow commented Mar 28, 2025

Copy link
Contributor

@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally with OCA/project#1478.
Please check the CI or reference the PR to solve the issue in the test.

TT56064

class TestWebTimeline(HttpCase):
def test_timeline_arch(self):
self.browser_js(
"/web/tests/legacy?mod=web&filter=TimelineView - ArchParser",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it complicated to convert the tests to the new style?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about it need to take a look


def test_timeline_view(self):
self.browser_js(
"/web/tests/legacy?mod=web&filter=TimelineView - View",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same here

@pedrobaeza
Copy link
Member

/ocabot migration web_timeline

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Apr 17, 2025
@OCA-git-bot OCA-git-bot mentioned this pull request Apr 17, 2025
46 tasks
@JasminSForgeFlow JasminSForgeFlow force-pushed the 18.0-mig-web_timeline branch 4 times, most recently from d84aced to cf61ce8 Compare April 21, 2025 08:34
@pedrobaeza
Copy link
Member

@JasminSForgeFlow any news?

lmignon and others added 10 commits May 9, 2025 12:04
* Avoid to display all items of group_by model
* Remove unnecessary readgroup
* Remove dependency on project. Modify module structure. Imporve readme file.
* Add setup.py
* [FIX] Correct write when grouped by

* Remove blank lines

* Minor changes
* Update the vis.js framework to latest stable version (v4.20.1) to add new functionality and save almost
400ko of source code in odoo assets (the vis dev team has isolate the code for timeline widget from the
 rest of their widgets)

* Add the possibility to display events with no duration (instantaneous) as the same time has regular events

* Add the possibility to choose between two scroll mode :
  -  zoom in time resolution (default)
  or
  -  vertical scroll (web browser default behaviour)

Signed-off-by: adrien.didenot <adrien.didenot@horanet.com>
…same as base Calendar view)

In Odoo calendar view, the attribute date_delay is an alternative to date_stop, to provides the duration of the event instead of its end date.
This commit integrate this attribute to the Timeline view, but contrary to the base Calendar view the Timeline view could use both arguments (date_stop and date_delay) simultaneously.

Signed-off-by: adrien.didenot <adrien.didenot@horanet.com>
The default window display all the events (aka 'fit'), in case of events spread over the year, the events are invisibles (too small to be readable)

Signed-off-by: adrien.didenot <adrien.didenot@horanet.com>
Change the attribute 'default_window' to 'mode' like the Odoo calendar view (to be iso functional)
carlos-lopez-tecnativa and others added 9 commits May 9, 2025 12:04
- Convert Moment.js to Luxon.
- Replace Underscore.js with native JavaScript code.
- Migrate legacy views to the new system and add an architecture parser to separate logic.
- added basic test
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: web-17.0/web-17.0-web_timeline
Translate-URL: https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_timeline/
Currently translated at 100.0% (16 of 16 strings)

Translation: web-17.0/web-17.0-web_timeline
Translate-URL: https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_timeline/it/
@JasminSForgeFlow JasminSForgeFlow force-pushed the 18.0-mig-web_timeline branch from cf61ce8 to 258a5a9 Compare May 9, 2025 06:36
@pedrobaeza
Copy link
Member

CI is still red.

@JasminSForgeFlow
Copy link
Contributor Author

CI is still red.

It's because of this warning

2025-05-09 06:39:17,536 287 WARNING odoo odoo.addons.web_timeline.tests.test_web_timeline.TestWebTimeline.test_timeline_view.browser: You disabled XSS protection for vis-Timeline. I sure hope you know what you're doing!

which is deactivated e3e9b5d

@pedrobaeza
Copy link
Member

@carlos-lopez-tecnativa do you know if this disabling is still needed? We should find any way of avoiding the red CI, silencing the warning or removing it at all.

@carlos-lopez-tecnativa
Copy link
Contributor

@JasminSForgeFlow please include #3169 to test that the XSS issue is resolved.

…L rendering

Before this commit, XSS filtering was disabled, which could introduce potential security risks.
This commit adopts a safer approach, similar to PR OCA#2525.
After this commit, XSS filtering is re-enabled, and a whitelist of allowed HTML elements is provided.
@JasminSForgeFlow
Copy link
Contributor Author

@JasminSForgeFlow please include #3169 to test that the XSS issue is resolved.

Done, Thanks

@carlos-lopez-tecnativa
Copy link
Contributor

Please include #3171

@JasminSForgeFlow
Copy link
Contributor Author

Please include #3171

Added

Copy link
Contributor

@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM @CarlosRoca13 @pedrobaeza please review this

Copy link
Contributor

@CarlosRoca13 CarlosRoca13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 18.0-ocabot-merge-pr-3136-by-CarlosRoca13-bump-nobump, awaiting test results.

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@OCA-git-bot OCA-git-bot merged commit 107e415 into OCA:18.0 May 13, 2025
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 85adaab. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.